<%@ page language="java" contentType="text/html;charset=UTF-8"%>
<%@ taglib uri="http://www.myce.net.cn/ce-tag" prefix="ce"%>
<%@ include file="/commons/taglibs.jsp"%>
<html>
<head>
	<title>修改租户资料</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<script language="JavaScript" type="text/javascript" src="${ctx}/scripts/tags/tabs/tabs.js"></script>
<link href="${ctx}/styles/tags/tabs.css" rel="stylesheet" type="text/css">

<link href="${ctx}/styles/grid.css" rel="stylesheet" type="text/css">
<link href="${ctx}/styles/listTable.css" rel="stylesheet" type="text/css">
<link href="${ctx}/styles/show.css" rel="stylesheet" type="text/css" />
<link href="${ctx}/styles/public.css" rel="stylesheet" type="text/css">
<link href="${ctx}/styles/aux_window.css" rel="stylesheet" type="text/css">
<link href="${ctx}/styles/public.css" rel="stylesheet" type="text/css">

<script type="text/javascript" src="${ctx}/scripts/public.js"></script>
<script language="JavaScript" type="text/javascript" src="${ctx}/scripts/div/common.js"></script>
<script language="JavaScript" type="text/javascript" src="${ctx}/pages/com/ce/pms/customer/tenement.js"></script>

<script language="JavaScript">
	participantId='${participantId}';
	var flag_button_click=true;
	var currentTab="tabBase";
	function save(btnId)
	{
	    if(document.getElementById(btnId).className=='buttonUnEditMiddle'){
	       return false;
	    }
		var timer = setTimeout("submitForm();",1000);
    }

    function submitForm(){
    	if(individual_isAllowLoad && validate_pass){
        	window.frames['connTabPanel'].ajaxSubmit();
        }
    }
    function setParticipantId(Id) {
    	participantId=Id;
    }
    function setsubmitBtnEdit(){
	  btn_change_Edit("5");
	  currentTab="tabBase";
	}
	function setsubmitBtnUnEdit(){
	  btn_change_UnEdit("5");
	  currentTab="tabFamily";
	}
	function setFamilyEdit(){
	 ableTabEdit("tabFamily");
	}
	function setFamilyUnEdit(){
	 disableTabEdit("tabFamily");
	}
	function freshParent(){
	 var frameTop=findFrame('main');
     frameTop.reLoadIFrameListWithQuery();
	}
	function close(){
	 windowClose();
	}
	function getFlagButtonClick(){
	  return flag_button_click;
	}
	function setFlagButtonClick(flat){
	 flag_button_click=flat;
	}
	function close_window(){
	 if(currentTab=='tabBase'){
	    window.frames["connTabPanel"].beforeCloseWin();
	 }else{
	 	setFlagButtonClick(true);
	 }
     if(getFlagButtonClick()){
       windowClose();
     } else {
        if(confirm("数据已经发生改变，是否保存")){
           window.frames["connTabPanel"].closeAjaxSubmit();
        } else {
        windowClose();
        }
     }
	}
	function onClickTabBase(){
	  onClickTab("tabBase");
	}
	function beforeCheck()
	{
		window.frames["connTabPanel"].beforeCloseWin();
		if(!flag_button_click)
		{
			if(confirm("数据已经发生改变，是否保存")){
              window.frames["connTabPanel"].closeAjaxSubmit();
            }else{
               flag_button_click=true;
            }
		}
	}
</script>
</head>

<table width="100%" border="0" cellpadding="0" cellspacing="0">
  <tr>
    <td class="window_head_outBg"><table border="0" cellpadding="0" cellspacing="0">
      <tr>
        <td><img src="${ctx}/images/ico_Advance.gif" width="16" height="16" align="absmiddle"> <span class="window_head_intext">修改租户资料</span></td>
        </tr>
    </table></td>
  </tr>
  <tr>
    <td class="aux_header_line_1"></td>
  </tr>
  <tr>
    <td class="aux_header_line_2"></td>
  </tr>
</table>
<ce:tabPanel panelId="con_tabPanel"
            iframeId="connTabPanel"
            hasTop="false"
            defaultHeight="400px">

  <ce:tab tabId="tabBase"
    caption="基本资料"
    baseUrl="${ctx}/customer_lesseeAction.do?method=initLesseeBaseEditMain&participantTypeCode=${participantTypeCode}&participantId=:participantId"
    jsParam="participantId"
    beforeFunction="setsubmitBtnEdit();"/>

  <ce:tab tabId="tabFamily"
    caption="家庭成员资料"
    baseUrl="${ctx}/customer_memberAction.do?method=showMemberInfoList&keyId=lesseeHouseColletion"
    beforeFunction="setsubmitBtnUnEdit();beforeCheck();"/>

</ce:tabPanel>
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
     <td class="window_footer"><table border="0" align="right" cellpadding="0" cellspacing="0">
        <tr>
          <td><table border="0" cellpadding="0" cellspacing="0">
          </table></td>
		  <td class="btn_between_space"></td>
          <td><table border="0" cellpadding="0" cellspacing="0" >
            <tr>
              <td class="buttonOffLeft" id="btn1_51"></td>
              <td class="buttonOffMiddle" id="btn1_52" onblur="btn_change(5)" onMouseOver="btn_change_over(5)" onMouseOut="btn_change_out(5)" onClick="save('btn1_52');"><img id="img_btn1_52" src="${ctx}/images/ico_ok.gif" border="0" align="absmiddle" /> 保 存</td>
              <td class="buttonOffRight" id="btn1_53"></td>
            </tr>
        </table></td>
        <td class="btn_between_space"></td>
        <td><table border="0" cellpadding="0" cellspacing="0">
            <tr>
              <td class="buttonOffLeft" id="btn1_31"></td>
              <td class="buttonOffMiddle" id="btn1_32" onblur="btn_change(3)" onMouseOver="btn_change_over(3)" onMouseOut="btn_change_out(3)" onClick="close_window();"><img src="${ctx}/images/ico_cancel.gif" border="0" align="absmiddle" /> 关 闭</td>
              <td class="buttonOffRight" id="btn1_33"></td>
            </tr>
        </table></td>
      </tr>
    </table></td>
  </tr>
</table>

</body>
</html>